/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;


/**
 *
 * @author Lee No Son
 */
public class DTObenhnhan {
    private Integer mabn;
    private String tenbn;
    private Date ngaysinh;
    private String dienthoai;
    private String cmnd;
    private Integer tuoi;
    private String diachi;
    private Integer gioitinh;
    private String baohiem;
    private Integer vuottuyen;
    private String phongkham;
    private String tiensusk;
    private String sophong;
    
    //khoi tao doi tuong voi tham so ResultSet
    public DTObenhnhan(ResultSet rs) throws SQLException{
        this.mabn = rs.getInt("mabn");
        this.tenbn = rs.getString("tenbn");
        this.ngaysinh = rs.getDate("ngaysinh");
        this.dienthoai = rs.getString("dienthoai");
        this.cmnd = rs.getString("cmnd");
        this.tuoi = rs.getInt("tuoi");
        this.diachi = rs.getString("diachi");
        this.gioitinh = rs.getInt("gioitinh");
        this.baohiem = rs.getString("baohiem");
        this.vuottuyen = rs.getInt("vuottuyen");
        this.phongkham = rs.getString("phongkham");
        this.tiensusk = rs.getString("sophong");
    }
    
    //khoi tao khong tham so
    public DTObenhnhan(){}

    //khoi tao cac tham so
    public DTObenhnhan(Integer mabn, String tenbn, Date ngaysinh, String dienthoai, String cmnd, Integer tuoi, String diachi, Integer gioitinh, String baohiem, Integer vuottuyen, String phongkham, String tiensusk, String sophong) {    
        this.mabn = mabn;
        this.tenbn = tenbn;
        this.ngaysinh = ngaysinh;
        this.dienthoai = dienthoai;
        this.cmnd = cmnd;
        this.tuoi = tuoi;
        this.diachi = diachi;
        this.gioitinh = gioitinh;
        this.baohiem = baohiem;
        this.vuottuyen = vuottuyen;
        this.phongkham = phongkham;
        this.tiensusk = tiensusk;
        this.sophong = sophong;
    }

    //get set
    public Integer getMabn() {
        return mabn;
    }

    public void setMabn(Integer mabn) {
        this.mabn = mabn;
    }

    public String getTenbn() {
        return tenbn;
    }

    public void setTenbn(String tenbn) {
        this.tenbn = tenbn;
    }

    public Date getNgaysinh() {
        return ngaysinh;
    }

    public void setNgaysinh(Date ngaysinh) {
        this.ngaysinh = ngaysinh;
    }

    public String getDienthoai() {
        return dienthoai;
    }

    public void setDienthoai(String dienthoai) {
        this.dienthoai = dienthoai;
    }

    public String getCmnd() {
        return cmnd;
    }

    public void setCmnd(String cmnd) {
        this.cmnd = cmnd;
    }

    public Integer getTuoi() {
        return tuoi;
    }

    public void setTuoi(Integer tuoi) {
        this.tuoi = tuoi;
    }

    public String getDiachi() {
        return diachi;
    }

    public void setDiachi(String diachi) {
        this.diachi = diachi;
    }

    public Integer getGioitinh() {
        return gioitinh;
    }

    public void setGioitinh(Integer gioitinh) {
        this.gioitinh = gioitinh;
    }

    public String getBaohiem() {
        return baohiem;
    }

    public void setBaohiem(String baohiem) {
        this.baohiem = baohiem;
    }

    public Integer getVuottuyen() {
        return vuottuyen;
    }

    public void setVuottuyen(Integer vuottuyen) {
        this.vuottuyen = vuottuyen;
    }

    public String getPhongkham() {
        return phongkham;
    }

    public void setPhongkham(String phongkham) {
        this.phongkham = phongkham;
    }

    public String getTiensusk() {
        return tiensusk;
    }

    public void setTiensusk(String tiensusk) {
        this.tiensusk = tiensusk;
    }

    public String getSophong() {
        return sophong;
    }

    public void setSophong(String sophong) {
        this.sophong = sophong;
    }

    

    
}
